import { nextTick } from 'vue'

export const useTableScroll = () => {
  const getTableScrollHeight = async (selectors: string) => {
    await nextTick()
    const dynamicScroll = document.querySelector(selectors)
    const tbody = dynamicScroll?.querySelector('.ant-table-tbody') as any
    return tbody?.offsetHeight
  }

  return {
    getTableScrollHeight
  }
}
